<?php
require '../../definitions.inc.php';
require '../../classDB.inc.php';
require '../../plugins/i18n/classI18N.inc.php';
require 'ich_data.php';
require 'ich_forms.php';

//set language
$_i18n = new classI18N();
$language = $_i18n->getActual('../../');
if($language!=-1 and $language!='') require $language;

//install check libraries
$_form = new ich_forms();
$_data = new ich_data();

//class for DB management
$_DB = new classDB();
$dbRes = $_DB->open();

if(!$dbRes) exit ($_form->getNoConnectionForm());
if(!$_data->table_exists('admins')) exit ($_form->getLoginIncorrectForm());

if($_data->admin_check($_REQUEST['login'], $_REQUEST['psswd'])!='0')
    echo $_form->getConfigErrorForm();
else 
    echo $_form->getLoginIncorrectForm();
?>
